﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Data;
using System.Text;
using MixScript.DBService;
using MixScript.BLL;
namespace MixScript.BLL.SD
{
    public class cPacking : cBaseBLL
    {
        public cPacking()
        {
        }

        public virtual bool getInquirya(ref DataTable dt, string mat, string tgl1, string tgl2, string inqTable, out string msg)
        {
            try
            {
                msg = "";
               
                DataTable dts = new DataTable();
                string ssql = "select * FROM [dbo].[vw_joid_packing_list_v] where 1=1  ";
                if (mat.Trim() != string.Empty)
                {
                    ssql += "and itpk='" + mat + "' ";
                }

                //if (wr.Trim() != string.Empty)
                //{
                //    ssql += "and cuid='" + wr + "' ";
                //}
                if ((tgl1.Trim() != string.Empty) && (tgl2.Trim() != string.Empty))
                {
                    ssql += "and dvdt between '" + tgl1 + "' and '" + tgl2 + "'";
                }
                dt = Dbserver.ExecuteQuery(ssql, inqTable);
                return dt.Rows.Count > 0;
            }
            catch (Exception ex)
            {

                throw ex;
            }
            return true;
        }  

     


    }
}
